import request from '@/utils/request'


export function getTrainInfo(id) {
    return request({
        url: 'train-plan/getTrainInfo/'+id,
        method: 'get',
    })
}

//pc、app移动端查询培训课程播放资源
export function getTrasinResource(id) {
    return request({
        url: 'train-plan/findOne/'+id,
        method: 'get',
    })
}

//保存当前培训课程个人当前学习进度，视频定位
export function saveTrainPersonStudyInfo(data) {
    return request({
        url: 'course/study-record-details/trainCreate',
        method: 'post',
        data
    })
}

//查询个人培训课程学习总体进度百分比
export function personTrainStudyPercent(params) {
    return request({
        url: 'course/study-record-details/train-study-percent',
        method: 'get',
        params
    })
}

//培训任务记笔记
export function addTrainNote(data) {
    return request({
        url: 'web/note/train-create',
        method: 'post',
        data
    })
}

//培训课程问题回复
export function answerTrainQue(data) {
    return request({
        url: 'web/answer/train-create',
        method: 'post',
        data
    })
}